FUNCTION
require
Asserts a boolean condition.
Parameters
- value — the boolean condition to check
- message — the message for the exception to be thrown if the condition is false
Throws
exception— if the provided condition is false
Since
0.6.0
function require<T>(value: T?, [message: text]): TAsserts that a value is not null.
Parameters
- value — the value to check, and returned if it is not
null - message — the error message to be thrown if the value is
null
Returns
the passed value, but with type cast from T? to T
Throws
exception— if the provided value isnull
Since
0.6.0
© 2026 Chromia